package com.ningxun.rms.domain.busrequire;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ningxun.rms.common.annotation.Excel;
import com.ningxun.rms.common.core.domain.BaseEntity;

import javax.validation.constraints.*;

/**
 * 岗位需求发布对象 bus_require
 * 
 * @author rms
 * @date 2025-07-15
 */
public class BusRequire extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 需求ID */
    private Long requireId;

    /** 部门id */
    private Long deptId;

    /** 岗位名称 */
    @Excel(name = "岗位名称")
    @NotBlank(message = "岗位名称不能为空")
    private String post;

    /** 课题研究目标 */
    @Excel(name="课题研究目标", handler=com.ningxun.rms.common.utils.poi.Html2TextHandler.class)
    @NotBlank(message = "课题研究目标不能为空")
    private String content;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modifyTime;

    /** 按类型查询？ */
//    @Excel(name = "岗位类型", dictType = "bus_require_type")
    //@NotNull(message = "类型不能为空")
    private Long demandType;

    /** 审核状态 0通过 1审核 2驳回 */
    private Long approveState;

    /** 过需求期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "过期时间不能为空")
    @Future(message = "过期时间必须是将来的时间")
    private Date expirationTime;

    /** 需求状态 0生效 1失效（过期、删除、未通过审核、岗位数量不足） */
    private Long requireState;

    /** 创建人ID */
    private Long creatorId;

    /** 岗位数量 */
    @Excel(name = "岗位数量")
    @NotNull(message = "岗位数量不能为空")
    @Min(value = 1, message = "岗位数量必须大于0")
    private Long quantity;

    /** 单位名称 */
    @Excel(name = "单位名称")
    @NotBlank(message = "单位名称不能为空")
    private String unit;

    /** 规划编制、重点课题名称 */
    @Excel(name = "规划编制、重点课题名称")
    @NotBlank(message = "规划编制、重点课题不能为空")
    private String project;

    /** 意向高校或专业 */
    @Excel(name = "意向高校或专业")
    @NotBlank(message = "意向高校或专业不能为空")
    private String intention;

    /** 联系人 */
    @Excel(name = "联系人")
    @NotBlank(message = "联系人不能为空")
    private String contact;

    /** 联系方式 */
    @Excel(name = "联系方式")
    @NotNull(message = "联系方式不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "联系方式格式不正确，需为11位手机号")
    private String number;

    /** 创建人名称 */
    private String createName;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date delTime;

    private String parentDeptName;
    public String getParentDeptName() { return parentDeptName; }
    public void setParentDeptName(String parentDeptName) { this.parentDeptName = parentDeptName; }

    private java.util.List<Long> deptIds;
    public java.util.List<Long> getDeptIds() { return deptIds; }
    public void setDeptIds(java.util.List<Long> deptIds) { this.deptIds = deptIds; }

    @Excel(name = "备注")
    private String remark;

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getRecruited() {
        return recruited;
    }

    public void setRecruited(Long recruited) {
        this.recruited = recruited;
    }

    @Excel(name = "已招聘数量")
    private Long recruited;

    private String latestApproveReview;
    public String getLatestApproveReview() { return latestApproveReview; }
    public void setLatestApproveReview(String latestApproveReview) { this.latestApproveReview = latestApproveReview; }

    public void setRequireId(Long requireId) 
    {
        this.requireId = requireId;
    }

    public Long getRequireId() 
    {
        return requireId;
    }

    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }

    public void setPost(String post) 
    {
        this.post = post;
    }

    public String getPost() 
    {
        return post;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setModifyTime(Date modifyTime) 
    {
        this.modifyTime = modifyTime;
    }

    public Date getModifyTime() 
    {
        return modifyTime;
    }

    public void setDemandType(Long demandType) 
    {
        this.demandType = demandType;
    }

    public Long getDemandType() 
    {
        return demandType;
    }

    public void setApproveState(Long approveState) 
    {
        this.approveState = approveState;
    }

    public Long getApproveState() 
    {
        return approveState;
    }

    public void setExpirationTime(Date expirationTime) 
    {
        this.expirationTime = expirationTime;
    }

    public Date getExpirationTime() 
    {
        return expirationTime;
    }

    public void setRequireState(Long requireState) 
    {
        this.requireState = requireState;
    }

    public Long getRequireState() 
    {
        return requireState;
    }

    public void setCreatorId(Long creatorId) 
    {
        this.creatorId = creatorId;
    }

    public Long getCreatorId() 
    {
        return creatorId;
    }

    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }

    public void setUnit(String unit) 
    {
        this.unit = unit;
    }

    public String getUnit() 
    {
        return unit;
    }

    public void setProject(String project) 
    {
        this.project = project;
    }

    public String getProject() 
    {
        return project;
    }

    public void setIntention(String intention) 
    {
        this.intention = intention;
    }

    public String getIntention() 
    {
        return intention;
    }

    public void setContact(String contact) 
    {
        this.contact = contact;
    }

    public String getContact() 
    {
        return contact;
    }

    public void setNumber(String number)
    {
        this.number = number;
    }

    public String getNumber()
    {
        return number;
    }

    public void setCreateName(String createName) 
    {
        this.createName = createName;
    }

    public String getCreateName() 
    {
        return createName;
    }

    public void setDelTime(Date delTime) 
    {
        this.delTime = delTime;
    }

    public Date getDelTime() 
    {
        return delTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("requireId", getRequireId())
            .append("deptId", getDeptId())
            .append("post", getPost())
            .append("content", getContent())
            .append("createTime", getCreateTime())
            .append("modifyTime", getModifyTime())
            .append("demandType", getDemandType())
            .append("approveState", getApproveState())
            .append("expirationTime", getExpirationTime())
            .append("requireState", getRequireState())
            .append("creatorId", getCreatorId())
            .append("quantity", getQuantity())
            .append("unit", getUnit())
            .append("project", getProject())
            .append("intention", getIntention())
            .append("contact", getContact())
            .append("number", getNumber())
            .append("remark", getRemark())
            .append("createName", getCreateName())
            .append("delTime", getDelTime())
                .append("recruited",getRecruited())
            .toString();
    }
}
